package com.su.current;

public class Task implements Runnable {

	@Override
	public void run() {
		// 清除阻塞状态
		try {
			System.out.println("running");
			while (!Thread.interrupted()) {
				System.out.println("sleep start");
				Thread.sleep(1);
				for (int i = 0; i < 10000; i++) {
					double d = Math.PI +Math.PI;
				}
				System.out.println("consuming time end");
			}
			System.out.println("running end");
		} catch (InterruptedException e) {
			System.out.println("out of loop");
			e.printStackTrace();
		}

	}

}
